package com.ruoyi.lc.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.lc.mapper.LcDatamodelGroupMapper;
import com.ruoyi.lc.domain.LcDatamodelGroup;
import com.ruoyi.lc.service.ILcDatamodelGroupService;

/**
 * 数据建模分组Service业务层处理
 * 
 * @author qibotian
 * @date 2025-01-07
 */
@Service
public class LcDatamodelGroupServiceImpl implements ILcDatamodelGroupService 
{
    @Autowired
    private LcDatamodelGroupMapper lcDatamodelGroupMapper;

    /**
     * 查询数据建模分组
     * 
     * @param id 数据建模分组主键
     * @return 数据建模分组
     */
    @Override
    public LcDatamodelGroup selectLcDatamodelGroupById(Long id)
    {
        return lcDatamodelGroupMapper.selectLcDatamodelGroupById(id);
    }

    /**
     * 查询数据建模分组列表
     * 
     * @param lcDatamodelGroup 数据建模分组
     * @return 数据建模分组
     */
    @Override
    public List<LcDatamodelGroup> selectLcDatamodelGroupList(LcDatamodelGroup lcDatamodelGroup)
    {
        return lcDatamodelGroupMapper.selectLcDatamodelGroupList(lcDatamodelGroup);
    }

    /**
     * 新增数据建模分组
     * 
     * @param lcDatamodelGroup 数据建模分组
     * @return 结果
     */
    @Override
    public int insertLcDatamodelGroup(LcDatamodelGroup lcDatamodelGroup)
    {
        lcDatamodelGroup.setCreateTime(DateUtils.getNowDate());
        return lcDatamodelGroupMapper.insertLcDatamodelGroup(lcDatamodelGroup);
    }

    /**
     * 修改数据建模分组
     * 
     * @param lcDatamodelGroup 数据建模分组
     * @return 结果
     */
    @Override
    public int updateLcDatamodelGroup(LcDatamodelGroup lcDatamodelGroup)
    {
        lcDatamodelGroup.setUpdateTime(DateUtils.getNowDate());
        return lcDatamodelGroupMapper.updateLcDatamodelGroup(lcDatamodelGroup);
    }

    /**
     * 批量删除数据建模分组
     * 
     * @param ids 需要删除的数据建模分组主键
     * @return 结果
     */
    @Override
    public int deleteLcDatamodelGroupByIds(Long[] ids)
    {
        return lcDatamodelGroupMapper.deleteLcDatamodelGroupByIds(ids);
    }

    /**
     * 删除数据建模分组信息
     * 
     * @param id 数据建模分组主键
     * @return 结果
     */
    @Override
    public int deleteLcDatamodelGroupById(Long id)
    {
        return lcDatamodelGroupMapper.deleteLcDatamodelGroupById(id);
    }

	@Override
	public int deleteLcDatamodelGroupByCode(String code) {
		return lcDatamodelGroupMapper.deleteLcDatamodelGroupByCode(code);
	}
}
